<extend name="Public/base" />

<block name="body">
	<div class="main-title cf">
		<h2>银行卡修改</h2>
	</div>

	<!-- 标签页导航 -->
	<div class="tab-wrap">
		<div class="tab-content">
			<!-- 表单 -->
			<form id="form" method="post" class="form-horizontal doc-modal-form">
				<!-- 基础 -->
				<div id="tab1" class="tab-pane in tab1">
					<div class="form-item cf">
						<label class="item-label">开户银行</label>
						<div class="controls">
                            <php>
                                $OPEN_BANK =   C('OPEN_BANK');

                            </php>

                            <select class="" name="openbank">
                                <foreach name="OPEN_BANK" item="val" key="key">
                                    <option <eq name="key" value="$info['openbank']">selected="selected"</eq> value="{$key}">{$val}</option>
                                </foreach>
                            </select>
						</div>
					</div>
					
					
                    <div class="form-item cf">
                        <label class="item-label">开户名字</label>
                        <div class="controls">
                            <input class="text input-large" style="height:30px;" name="name" value="{$info.name}" type="text">
                        </div>
                    </div>
                    <div class="form-item cf">
                        <label class="item-label">银行卡号</label>
                        <div class="controls">
                            <input class="text input-large" style="height:30px;" name="card_number" value="{$info.card_number}" type="text">
                        </div>
                    </div>
                    <div class="form-item cf">
                        <label class="item-label">预留号码</label>
                        <div class="controls">
                            <input class="text input-large" style="height:30px;" name="mobile" value="{$info.mobile}" type="text">
                        </div>
                    </div>

				</div>
                <div class="form-item cf">
                    <button class="btn submit-btn ajax-post hidden" id="submit" type="submit" target-form="form-horizontal">确 定</button>
                    <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
                    <input name="id" value="{$info.id}" type="hidden">
                </div>


			</form>
		</div>
	</div>
</block>
<block name="script">
<script type="text/javascript" src="__STATIC__/jquery.dragsort-0.5.1.min.js"></script>
<script type="text/javascript" charset="utf-8">
Think.setValue("extend", {$info.extend|default=0});
//导航高亮
highlight_subnav('{:U('Authentication/bank')}');

//拖曳插件初始化
$(function(){
    function city(pid,province){
        var Url = "{:U('Weixin/Ajax/getRegion')}";
        $.ajax({
            type: 'GET',
            url: Url,
            data: {pid:pid},
            cache:false,
            dataType: 'json',
            success: function(res){
                var html = '';
                for (var i=0;i<res.length;i++)
                {
                    if(province==res[i].value){
                        html+='<option selected value="'+res[i].value+'">'+res[i].label+'</option>'
                    }else{
                        html+='<option value="'+res[i].value+'">'+res[i].label+'</option>'
                    }
                }
                $('.city').html(html)
            },
            complete:function(XMLHttpRequest,status){
                if(status=='timeout'){
                    popup.alert('服务器繁忙，请稍后...');
                }
            }
        });
    }
  $('.province').change(function(){
    var pid = $(this).val();
      city(pid);
  })
    var province = $('.province').val();
    var city2 = $('.city').attr('data-val');
    city(province,city2);
})
</script>
</block>

